package com.mall.parking.controller;

import com.mall.parking.entity.Member;
import com.mall.parking.service.MemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("member")
@Slf4j
public class MemberController {

    @Autowired
    private MemberService memberService;

    @RequestMapping("/list")
    public List<Member> list() {
        List<Member> members = memberService.list();
        log.debug("query member list = " + members);
        return members;
    }

}
